const Storage = {}

Storage.get = function(name) {
	return JSON.parse(localStorage.getItem(name))
}

Storage.set = function(name, val) {
	localStorage.setItem(name, JSON.stringify(val))
}

Storage.add = function(name, addVal) {
	let oldVal = Storage.get(name)
	let newVal = oldVal.concat(addVal)
	Storage.set(name, newVal)
}


Storage.clear = function() {
	localStorage.clear();
}

Storage.removeItem = function(name) {
	localStorage.removeItem(name);
}
export default Storage
